package com.jiaming.employee.account.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jiaming.employee.account.bean.pojo.Account;
import com.jiaming.employee.account.bean.vo.LoginVo;
import com.jiaming.employee.account.mapper.AccountMapper;
import com.jiaming.employee.account.service.IAccountService;
import org.springframework.stereotype.Service;

/**
 * @author dragon
 * @create 2021-05-15 9:03
 */
@Service
public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> implements IAccountService {

    @Override
    public Account getLogin(LoginVo loginVo) {
        QueryWrapper<Account> accountQueryWrapper = new QueryWrapper<>();
        accountQueryWrapper.eq("login_name",loginVo.getLoginName()).eq("login_pwd",loginVo.getLoginPwd());
        return this.getOne(accountQueryWrapper);
    }
}
